<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const info = {
        name: "jack",
        // say: function () {
        //   console.log("hello");
        // },
        say() {
          console.log("hello");
        },
      };
      info.age = 20; //新增属性
      info.talk = function () {
        console.log("hi");
      };
      info.talk(); //调用方法
      info.say(); //调用方法
    </script>
  </body>
</html>
